"use strict";
/*
 * @Author: Fan Dong
 * @Date: 2021-06-25 17:22:37
 * @LastEditors: Fan Dong
 * @LastEditTime: 2021-06-30 11:13:40
 * @Description: 文件描述
 * @FilePath: \learn-typescript\ts\6.接口.ts
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Dog2 = /** @class */ (function () {
    function Dog2(name) {
        this.name = name;
    }
    Dog2.prototype.eat = function () {
        console.log(this.name + "吃粮食");
    };
    return Dog2;
}());
var d = new Dog2("小黑");
d.eat();
var Cat2 = /** @class */ (function () {
    function Cat2(name) {
        this.name = name;
    }
    Cat2.prototype.eat = function (food) {
        console.log(this.name + "吃" + food);
    };
    return Cat2;
}());
var c = new Cat2("小花");
c.eat("老鼠");
var Programmer = /** @class */ (function () {
    function Programmer(name) {
        this.name = name;
    }
    Programmer.prototype.coding = function (code) {
        console.log(this.name + code);
    };
    return Programmer;
}());
var Web4 = /** @class */ (function (_super) {
    __extends(Web4, _super);
    function Web4(name) {
        return _super.call(this, name) || this;
    }
    Web4.prototype.eat = function () {
        console.log(this.name + "喜欢吃馒头");
    };
    Web4.prototype.work = function () {
        console.log(this.name + "写代码");
    };
    return Web4;
}(Programmer));
var w4 = new Web4("小李");
w4.eat();
w4.work();
w4.coding('写ts代码');
